package com.hlk.feign;

import com.hlk.config.ServiceConstant;
import com.hlk.feign.fallback.ArticleFeignClientFallbackFactory;
import com.hlk.feign.fallback.UserFeignClientFallbackFactory;
import com.hlk.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author hlk
 * @version 1.0
 * @date 2021-01-18 11:59
 */
@Component
@FeignClient(name = ServiceConstant.ARTICLE_SERVICE, fallback = ArticleFeignClientFallbackFactory.class)
public interface ArticleFeignClient {

    @GetMapping("portal/article/detail")
    @ApiOperation(value = "文章详情查询")
    Result detail(@RequestParam String articleId);
}
